'use strict';

const defaultConfig = require('../common/config');

module.exports = {
  ...defaultConfig,
  advanced: false,
  indent: '  ',
  keywords: [
    'alignas',
    'alignof',
    'and',
    'and_eq',
    'asm',
    'atomic_cancel',
    'atomic_commit',
    'atomic_noexcept',
    'auto',
    'bitand',
    'bitor',
    'bool',
    'break',
    'case',
    'catch',
    'char',
    'char8_t',
    'char16_t',
    'char32_t',
    'class',
    'compl',
    'concept',
    'const',
    'consteval',
    'constexpr',
    'constinit',
    'const_cast',
    'continue',
    'co_await',
    'co_return',
    'co_yield',
    'decltype',
    'default',
    'delete',
    'do',
    'double',
    'dynamic_cast',
    'else',
    'enum',
    'explicit',
    'export',
    'extern',
    'false',
    'float',
    'for',
    'friend',
    'goto',
    'if',
    'inline',
    'int',
    'long',
    'mutable',
    'namespace',
    'new',
    'noexcept',
    'not',
    'not_eq',
    'nullptr',
    'operator',
    'or',
    'or_eq',
    'private',
    'protected',
    'public',
    'reflexpr',
    'register',
    'reinterpret_cast',
    'requires',
    'return',
    'short',
    'signed',
    'sizeof',
    'static',
    'static_assert',
    'static_cast',
    'struct',
    'switch',
    'synchronized',
    'template',
    'this',
    'thread_local',
    'throw',
    'true',
    'try',
    'typedef',
    'typeid',
    'typename',
    'union',
    'unsigned',
    'using',
    'virtual',
    'void',
    'volatile',
    'wchar_t',
    'while',
    'xor',
    'xor_eq',
  ],
  symbolMap: {
    'ASSIGN': '=',
    'EQ': '==',
    'NOT': '!=',
    'AND': '&&',
    'OR': '||',
    'PLUS': '+',
    'SUB': '-',
    'MULTI': '*',
    'DIV': '/',
    'POWER': '^',
    'GREATER': '>',
    'GREATER_EQ': '>=',
    'LESS': '<',
    'LESS_EQ': '<=',
    'REVERSE': '!',
    'CONCAT': '+'
  },
  modifyOrder: [
    'FINAL',
    'ABSTRACT',
    'STATIC'
  ],
  model: {
    dir: 'models',
    include: []
  },
  client: {
    name: 'Client',
    include: []
  },
  response: 'response_',
  request: 'request_',
  runtime: 'runtime_',
  header_ext: 'hpp',
  code_ext: 'cpp',
  tea: {
    name: 'Darabonba',
    header: 'Core.hpp',
    core: {
      name: 'Darabonba::Core',
      doAction: 'doAction',
      allowRetry: 'allowRetry',
      sleep: 'sleep',
      getBackoffTime: 'getBackoffTime',
      isRetryable: 'isRetryable',
    },
    stream: { name: 'Darabonba::Stream' },
    model: { name: 'Darabonba::Model' },
    converter: { name: 'Darabonba::Converter' },
    response: { name: 'Darabonba::Response' },
    request: { name: 'Darabonba::Request' },
    exception: { name: 'std::exception' },
    error: { name: 'Darabonba::Error' },
    exceptionUnretryable: { name: 'Darabonba::UnretryableError' },
  },
  third: {
    darabonba_core: { import: 'darabonba_core', alias: null, includeFileName: '<darabonba/core.hpp>', using: null },
    map: { import: 'map', alias: null, includeFileName: '<map>', using: null },
    iostream: { import: 'iostream', alias: null, includeFileName: '<iostream>', using: 'std' },
    vector: { import: 'vector', alias: null, includeFileName: '<vector>', using: null },
    stream: { import: 'stream', alias: null, includeFileName: '<cpprest/streams.h>', using: null },
    algorithm: { import: 'algorithm', alias: null, includeFileName: '<algorithm>', using: null },
    boost_any: { import: 'boost_any', alias: null, includeFileName: '<boost/any.hpp>', using: null },
    throw_exception: { import: 'throw_exception', alias: null, includeFileName: '<boost/throw_exception.hpp>', using: null },
    cast: { import: 'boost_lexical_cast', alias: null, includeFileName: '<boost/lexical_cast.hpp>', using: null }
  },
  modules: {
    darabonba: {
      Number: { // darabonba package name
        exclude: true,
        methods: {
          // the name of method in package
          // <method-name> : <method-alias-name>
          'parseInt': 'parse',
          'parseLong': 'parse',
          'parseFloat': 'parse',
          'parseDouble': 'parse',
          'itol': 'parse',
          'ltoi': 'parse',
          'add': 'binary_operation',
          'sub': 'binary_operation',
          'mul': 'binary_operation',
          'div': 'binary_operation',
          'gt': 'binary_operation',
          'gte': 'binary_operation',
          'lt': 'binary_operation',
          'lte': 'binary_operation'
        }
      }
    }
  }
};
